package com.fox.stream;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.cloud.stream.annotation.EnableBinding;
import org.springframework.cloud.stream.annotation.StreamListener;
import org.springframework.stereotype.Component;

@Component
@EnableBinding(DefaultProcess.class)

public class StreamListen {
    private Logger log= LoggerFactory.getLogger(StreamListen.class);
    //监听消息
    @StreamListener(DefaultProcess.INPUT)
    public void stream(Object msg){
        log.info("【SpringCloud Stream】StreamListen.stream={}",msg);
    }
}